package com.atguigu.day02;

import org.apache.flink.api.common.typeinfo.Types;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @description :
 * @autor :lyh
 */
public class Example2 {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);

        env
                .fromElements(1)
                .map(r -> Tuple2.of(r,r))
                .returns(Types.TUPLE(Types.INT,Types.INT ))
                .print();



        env.execute();

    }
}
